home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / csh547src.lha / WindowBounds.h < prev   
C/C++ Source or Header  |  1995-01-07  |  1KB  |  57 lines

  1. /*
  2.  *  get window bounds (dimensions)
  3.  *  Copyright 1994-1995, Andreas M. Kirchwitz
  4.  */
  5.  
  6.  
  7. #include <dos/dos.h>
  8.  
  9. #define GWB_TIMEOUT_LOCAL    1        /* one microsecond */
  10. #define GWB_TIMEOUT_SHORT    1000        /* one millisecond */
  11. #define GWB_TIMEOUT_LONG    1000000        /* one full second */
  12.  
  13.  
  14.  
  15. void get_WindowBounds_def(int *width, int *height);
  16.  /*
  17.   *  get default window bounds  (80x24)
  18.   */
  19.  
  20.  
  21.  
  22. long get_WindowBounds_env(int *width, int *height);
  23.  /*
  24.   *  get window bounds from environment  (COLUMNS, LINES),
  25.   *  first local then global
  26.   *
  27.   *  width/height are only modified if COLUMNS/LINES is set
  28.   *
  29.   *  returns 0, if no window bound could be read
  30.   */
  31.  
  32.  
  33.  
  34. long get_WindowBounds_con(BPTR con, int *width, int *height,long timeout);
  35.  /*
  36.   *  get window bounds from console (with user defined timeout),
  37.   *  "con" must be in RAW mode
  38.   *
  39.   *  width/height are only modified if console responds to the
  40.   *  "window status report" (special Amiga control sequence)
  41.   *  within the specified timeout period (in microseconds)
  42.   *
  43.   *  returns 0, if no window bound could be read
  44.   */
  45.  
  46.  
  47.  
  48. long get_WindowBounds_Output(int *width, int *height,long timeout);
  49.  /*
  50.   *  get window bounds from Output()
  51.   *
  52.   *  sets to RAW, calls get_WindowBounds_con(), sets to cooked
  53.   *
  54.   *  returns 0, if no window bound could be read
  55.   */
  56.  
  57.